# -*-coding = utf-8 -*-

# @Time: 2021/4/9 16:06
# @Author: bistro
# @File: p154.py
# @Software: PyCharm
from typing import List


class Solution:
    def findMin(self, nums: List[int]) -> int:
        """
        二分+去重
        """
        left = 0
        right = len(nums)-1
        while left < right:
            mid = (left + right)//2
            if nums[mid] < nums[right]:
                right = mid
            elif nums[mid] > nums[right]:
                left = mid + 1
            else:
                right -= 1  # 右指针左移
        return nums[left]
